package com.terrier.ui.events
{
    import flash.display.Stage;
    import flash.events.Event;

    /**
     * 组件系统事件
     *
     * @author Jarvis.weng
     */
    public class WxSystemEvent extends Event
    {
        private var _stage:Stage;

        /**
         * 定义 stage_init 事件对象的 type属性值 - stage初始化
         * @default
         */
        public static const STAGE_INIT:String = "stage_init";

        /**
         * 构造函数
         * @param type 事件类型
         * @param stage stage对象
         * @param bubbles 事件是否为冒泡事件
         * @param cancelable 事件是否可以取消
         */
        public function WxSystemEvent(type:String, stage:Stage = null, bubbles:Boolean = false, cancelable:Boolean = false)
        {
            super(type, bubbles, cancelable);
            _stage = stage;
        }

        /**
         * stage对象
         * @return
         */
        public function get stage():Stage
        {
            return _stage;
        }

        /**
         * @private
         */
        override public function clone():Event
        {
            var e:WxSystemEvent = new WxSystemEvent(this.type, this.stage, this.bubbles, this.cancelable);
            return e;
        }
    }
}
